<template>


  <div style="padding: 20px">
        <div><span class="add" style="float: right" @click="$router.push('/addsuppplier')">添加供应商</span></div>
        <br>
        <br>
    <el-table
        :data="suppliering"
        border
        style="width: 100%">
      <el-table-column
          fixed
          prop="suppliers"
          label="供应商名称"
          width="150">
      </el-table-column>
      <el-table-column
          prop="address"
          label="地址"
          width="120">
      </el-table-column>
      <el-table-column
          prop="postalcode"
          label="邮政编号"
          width="120">
      </el-table-column>
      <el-table-column
          prop="phone"
          label="电话"
          width="120">
      </el-table-column>
      <el-table-column
          prop="fax"
          label="传真"
          width="300">
      </el-table-column>
      <el-table-column
          fixed="right"
          label="操作"
          width="100">
        <template slot-scope="scope">
          <el-button @click="handleClick(scope.row)" type="text" size="small">修改</el-button>
          <el-button type="text" size="small">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    </div>
</template>

<script>
export default {
  name: "suppliers",
data(){
    return{
        // supp:{
        //   suppliers:'',
        //   address:'',
        //   postalcode:'',
        //   phone:'',
        //   fax:'',
        // },
      suppliering: []
    }
},
  created() {
    this.$axios.get("/api/supplier/suppliers").then(res => {
      console.log(res);
  if(res.data.status===1){
    this.suppliering=res.data.data;
  }
    })

  },
}
</script>

<style>
.box-card{
 /*margin: 20px;*/

}
.add:hover{
  color: red;
}


</style>